/*
 * @Author: 涵崽
 * @Date: 2023-12-25 10:05:53
 * @email: 1045654@qq.com
 * @gitee: https://gitee.com/han-zai
 * @LastEditors: 涵崽
 * @LastEditTime: 2023-12-25 12:58:44
 * @Description: 微信：1045654
 */
import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import permission from './modules/permission' // 新增
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    user,
    permission
  },
  getters,
  plugins: [
    createPersistedState({
      paths: ['app', 'settings', 'user', 'permission'] // 要存的数据模块，如果不配置，默认所有模块的数据都保存
    })
  ]
})

export default store
